/*
 * 
 * 
 * 
 */
package com.hboxs.asl.entity;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.*;

/**
 * Entity - 直播礼物
 */
@Entity
@Table(name = "xx_live_gift")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "xx_live_gift_sequence")
public class LiveGift extends OrderEntity {

    private static final long serialVersionUID = -7907808724444149722L;

    /**
     *  名称
     */
    private String name;

    /**
     * 金币
     */
    private BigDecimal coin;

    /**
     * 图片
     */
    private String image;

    /**
     * 直播礼物
     */
    private List<LiveGiftTrade> liveGiftTrades = new ArrayList<>();


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public BigDecimal getCoin() {
        return coin;
    }

    public void setCoin(BigDecimal coin) {
        this.coin = coin;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    @OneToMany(mappedBy = "liveGift", fetch = FetchType.EAGER, cascade = CascadeType.REMOVE)
    public List<LiveGiftTrade> getLiveGiftTrades() {
        return liveGiftTrades;
    }

    public void setLiveGiftTrades(List<LiveGiftTrade> liveGiftTrades) {
        this.liveGiftTrades = liveGiftTrades;
    }
}